const Http = require('./http');
const Api= require('./api');

class ShopService {
  static index(data) {
    data.project_type = 4;
    return Http.request({
    	url: Api.Shop.index,
    	data: data
    });
  }

  static detail(data) {
 data.project_type = 4;
    return Http.request({
      url: Api.Shop.detail,
      data: data
    });
  }

  static detailInfo(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.detailInfo,
      data: data
    });
  }

  static delAddress(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.delAddress,
      data: data
    });
  }

  static addAddress(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.addAddress,
      data: data
    });
  }

  static getAddrList(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getAddrList,
      data: data
    });
  }

  static getAddrDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getAddrDetail,
      data: data
    });
  }

  static setAddressDefault(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.setAddressDefault,
      data: data
    });
  }

  static getDefaultAddress(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getDefaultAddress,
      data: data
    });
  }

  static saveReturnLogistics(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.saveReturnLogistics,
      data: data
    });
  }

  static updatePayStatus(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.updatePayStatus,
      data: data
    });
  }
  static updateYyPayStatus(data) {
  data.project_type = 4;
    return Http.request({
      url: Api.Shop.updateYyPayStatus,
      data: data
    });
  }
  static createOrder(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.createOrder,
      data: data
    });
  }

  static confirmOrder(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.confirmOrder,
      data: data
    });
  }

  static getMallOrderList(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getMallOrderList,
      data: data
    });
  }

  static getUnifiedOrder(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getUnifiedOrder,
      data: data
    });
  }

  static getPayComplate(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getPayComplate,
      data: data
    });
  }

  static getOrderDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getOrderDetail,
      data: data
    });
  }

  static getReturnLogistics(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getReturnLogistics,
      data: data
    });
  }

  static getPayDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getPayDetail,
      data: data
    });
  }

  static getCouponDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getCouponDetail,
      data: data
    });
  }

  static detailCoupon(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.detailCoupon,
      data: data
    });
  }
  static getDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getDetail,
      data: data
    });
  }
  static shareCoupon(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.shareCoupon,
      data: data
    });
  }
  static getShareDetail(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getShareDetail,
      data: data
    });
  }
  static receiveCoupon(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.receiveCoupon,
      data: data
    });
  }
  static getPayParams(data) {
	data.project_type = 4;
    return Http.request({
      url: Api.Shop.getPayParams,
      data: data
    });
  }

  static getCouDetail(openid,id) {
    return Http.request({
      url: Api.Shop.getCouDetail,
      data: {openid:openid,id:id,project_type:4}
    });
  }
  static addUserCoupon(openid,id) {
    return Http.request({
      url: Api.Shop.addUserCoupon,
      data: {openid:openid,id:id,project_type:4}
    });
  }
  static getProductList(data) {
      data.project_type = 4;
      return Http.request({
          url: Api.Shop.getProductList,
          data: data
      });
  }

  static getProductDetail(data) {
      data.project_type = 4;
      return Http.request({
          url: Api.Shop.getProductDetail,
          data: data
      });
  }

  static getUserCoupon(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getUserCoupon,
            data: data
        });
    }
  static getAdvertiseList(data) {
    data.project_type = 4;
    return Http.request({
      url: Api.Shop.getAdvertiseList,
      data: data
    });
  }

    static getMallStoreInfo(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getMallStoreInfo,
            data: data
        });
    }
    
    static getProductCouponList(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getProductCouponList,
            data: data
        });
    }

    static getCouponList(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getCouponList,
            data: data
        });
    }
		
		static getPostage(data) {
				data.project_type = 4;
				return Http.request({
						url: Api.Shop.getPostage,
						data: data
				});
		}
    static getCouponCount(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getCouponCount,
            data: data
        });
    }
		
		static cancelOrder(data) {
				data.project_type = 4;
				return Http.request({
						url: Api.Shop.cancelOrder,
						data: data
				});
		}
		
		static getYiYeOrderList(data) {
				data.project_type = 4;
				return Http.request({
						url: Api.Shop.getYiYeOrderList,
						data: data
				});
		}

        static getYiYeOrderList(data) {
            data.project_type = 4;
            return Http.request({
                url: Api.Shop.getYiYeOrderList,
                data: data
            });
        }

        static getApplyOrderList(data) {
            data.project_type = 4;
            return Http.request({
                url: Api.Shop.getApplyOrderList,
                data: data
            });
        }
    //支付接口如果是店员需要传店员openid
    static createYyOrder(data) {
        var user = wx.getStorageSync('user');
        if(user.keeper_uid) {
            data.sub_openid = user.clerk_openid;
        }
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.createYyOrder,
            data: data
        });
    }

    static confirmYyOrder(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.confirmYyOrder,
            data: data
        });
    }

    static getYyPayParams(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getYyPayParams,
            data: data
        });
    }

    static getYyOrderDetail(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getYyOrderDetail,
            data: data
        });
    }

    static cancelYyOrder(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.cancelYyOrder,
            data: data
        });
    }
    static getOrderList(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getOrderList,
            data: data
        });
    }
    static getTicketList(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getTicketList,
            data: data
        });
    }
    static createTicketOrder(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.createTicketOrder,
            data: data
        });
    }
    static getPayParams1(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getPayParams1,
        data: data
      });
    }
    static orderQuery(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.orderQuery,
        data: data
      });
    }
    static getTLOrderDetail(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getTLOrderDetail,
        data: data
      });
    }
    static cancelTLOrder(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.cancelTLOrder,
        data: data
      });
    }
    static getPayH5Code(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getPayH5Code,
        data: data
      });
    }
    static getOrderStatus(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getOrderStatus,
        data: data
      });
    }
    static getOrderSuperior(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getOrderSuperior,
        data: data
      });
    }
    static getOrderReturnList(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getOrderReturnList,
        data: data
      });
    }
    static getReturnOrderDetail(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getReturnOrderDetail,
        data: data
      });
    }
    static getReturnApplyInfo(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getReturnApplyInfo,
        data: data
      });
    }
    static getReturnAmount(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getReturnAmount,
        data: data
      });
    }
    static returnApplycreateOrder(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.returnApplycreateOrder,
        data: data
      });
    }
    static applygetPayParams(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.applygetPayParams,
        data: data
      });
    }
    static getReturningOrder(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getReturningOrder,
        data: data
      });
    }
    static getOrderReturnSuperior(data) {
    data.project_type = 4;
      return Http.request({
        url: Api.Shop.getOrderReturnSuperior,
        data: data
      });
    }
    static returnOrderDetectionSend(data) {
    data.project_type = 4;
      return Http.request({
        method:'POST',
        url: Api.Shop.returnOrderDetectionSend,
        data: data
      });
    }
    static saveBusinessProof(data) {
    data.project_type = 4;
      return Http.request({
        method:'POST',
        url: Api.Shop.saveBusinessProof,
        data: data
      });
    }
    static deleteProof(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.deleteProof,
            data: data
        });
    }
    static getProofList(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getProofList,
            data: data
        });
    }
    static getDetails(data) {
        data.project_type = 4;
        return Http.request({
            url: Api.Shop.getDetails,
            data: data
        });
    }
    
    
    
    
    
    
}
module.exports = ShopService;